- @title = t('attendance.heading_without_date', group: @group.name)

= form_tag group_attendance_index_path(@group), method: :get do
  = hidden_field_tag :public, true
  = hidden_field_tag :token, params[:token]
  .form-group
    .input-group
      .input-group-btn
        %button{ type: 'button', class: 'btn btn-info date-picker-btn' }
          = icon 'fa fa-calendar'
      = date_field_tag :attended_at, @attended_at.to_s(:date), class: 'form-control'

= form_tag batch_group_attendance_index_path(@group), id: 'attendance_form' do
  = hidden_field_tag :public, true
  = hidden_field_tag :token, params[:token]
  = hidden_field_tag :attended_at, @attended_at.to_s(:date)
  .form-group
    %table.table.list-checkin
      - @records.each do |person, record|
        %tr
          %td{ style: 'width: 5%' }
            = check_box_tag 'ids[]', person.id, record ? true : false, id: "ids_#{person.id}", class: 'simple icon-check'
          %td
            %label{ for: "ids_#{person.id}", class: 'inline' }
              = person.name
          %td
            %label{ for: "ids_#{person.id}", class: 'inline' }
              = avatar_tag person, fallback_to_family: true
  .form-group
    = label_tag :notes, t('attendance.notes.label')
    = text_area_tag :notes, '', class: 'form-control'
    %span.help-block= t('attendance.notes.help')
  .form-group.list-checkin-status
    .status{ style: 'display:none' }
    = button_tag t('attendance.submit_notes'), class: 'btn btn-success'
